<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #d1{background-color: pink}
        .c1{color: green}
        li,a{background-color: blue}

        a:link{color:green}
        a:visited{color: blue}
        a:hover{color: red}
        a:active{color:yellow}

        input[type='text']{color: red}
        input[type='password']{background-color: green}

        div div span{color: green}
        body>div>div>span{background-color: red}

    </style>
</head>
<body>
<div id="d1">刘备</div><div>关羽</div><div class="c1">张飞</div>
<span>悟空</span><span>八戒</span><span>沙僧</span>
<ul>
    <li>水煮鱼</li><li>红烧肉</li><li>黄焖鸡</li>
</ul>
<input type="text"><input type="password">
<a href="http://www.baidu.com">百度</a>
<div>
    <span>s1</span>
    <div><span>s2</span></div>
    <div>
        <span>s3</span>
        <div><span>s4</span></div>
    </div>
</div>

</body>
</html>